﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D旋转盒子</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<script src="../js/jquery.min.js"></script>
<style>
* {
	margin:0px;
	padding:0px;
}
body {
	/*background:linear-gradient(to botttom,#c0392b,#16a085,#2980b9);
	*/
		background-color:#16a085;
}
.warp {
	height:100vh;
	display:flex;
	justify-content:center;
	align-items:center;
}
.cude {
	width:200px;
	height:200px;
	position:absolute;
	transform-style:preserve-3d;
	transform:rotateY(0deg) rotateX(-45deg) rotateZ(-45deg);
	animation:cude 8s linear infinite
}
.cude .side {
	/*!--. side 索引*/
		width:100%;
	height:100%;
	position:absolute;
	box-sizing:border-box;
	border:1px solid #000;
	padding:10px;
	background-color:#fff;
}
.cude .side .min {
	width:100px;
	height:100px;
	position:absolute;
	box-sizing:border-box;
	border:1px solid #000;
	margin:50px auto;
	background-color:#1ff;
}
.cude .cude-front {
	transform:rotateY(0deg) translateZ(150px);
}
.cude .cude-back {
	transform:rotateY(180deg) translateZ(150px);
}
.cude .cude-left {
	transform:rotateY(-90deg) translateZ(150px);
}
.cude .cude-right {
	transform:rotateY(90deg) translateZ(150px);
}
.cude .cude-top {
	transform:rotateX(90deg) translateZ(150px);
}
.cude .cude-bottom {
	transform:rotateX(-90deg) translateZ(150px);
}
@keyframes cude {
	0% {
	transform:rotateY(0deg) rotateX(-45deg) rotateZ(0deg);
}
100% {
	transform:rotateY(0deg) rotateX(-45deg) rotateZ(360deg);
}
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="warp">


    <div class="cude">
        <div class="side cude-front">
            <h2>Front</h2>
        </div>

        <div class="side cude-back">
            <h2>Back</h2>
        </div>

        <div class="side cude-left">
            <h2>Left</h2>
        </div>

        <div class="side cude-right">
            <h2>Right</h2>
        </div>

        <div class="side cude-top">
            <h2>Top</h2>
        </div>

        <div class="side cude-bottom">
            <h2>Bottom</h2>
        </div>
    </div>
</div>

<script>

</script>

</body>
</html>
